package cn.electronic.sale.service.imp;

import java.util.List;

import org.springframework.stereotype.Service;

import cn.electronic.sale.mapper.OrdersMapper;
import cn.electronic.sale.pojo.GoodsCustom;
import cn.electronic.sale.pojo.Orders;
import cn.electronic.sale.service.OrdersService;
@Service
public class OredersServiceImp extends BasicServiceImp implements OrdersService {

	public void insertOrders(Orders order) throws Exception {
		// TODO Auto -generated method stub
		//ordersMapper.insertSelective(order);
		ordersMapper.insert(order);
	}

	public List<Orders> selectIndentByCustom(Integer customerId) throws Exception {
		// TODO Auto-generated method stub
		return ordersMapper.selectIndentByCustom(customerId);
		
	}

	public List<GoodsCustom> selectAllGoodsInfoByCustomerId(Integer customerId)
			throws Exception {
		// TODO Auto-generated method stub
		return goodsMapper.selectAllGoodsInfoByCustomerId(customerId);
	}

	public int deleteByGoodsAndCustomerId(Integer goodsId, Integer customerId)
			throws Exception {
		// TODO Auto-generated method stub
		return ordersMapper.deleteByGoodsAndCustomerId(goodsId, customerId);
	}

}
